import redis.clients.jedis.Jedis;
import redis.clients.jedis.JedisPool;

class RedisPool {

        private JedisPool pool;
        public RedisPool(){
            this.pool = new JedisPool();
        }
        public void execute(CallWithJedis caller){

            //防止连接不归还
            try(Jedis jedis = pool.getResource()){
                caller.call(jedis);
            }
        }


}
